package com.luzhikun.Listener.ServletRequestListener;

import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;

/**
 * @Author Rookie Coder
 * @Description javaWeb三大组件之监听器一：
 * @Date 请求对象监听器：
 * 当发出请求时该监听器立刻创建，在本次请求结束后被销毁
 **/

public class RequestListener implements ServletRequestListener {

    @Override
    public void requestDestroyed(ServletRequestEvent sre) {
        System.out.println("请求对象被销毁");

    }
    @Override
    public void requestInitialized(ServletRequestEvent sre) {
        System.out.println("请求对象被创建");
    }
}
